package com.jdz.gxq.info.admin.role.service;

import java.util.List;
import java.util.Map;

import com.jdz.gxq.info.admin.role.bo.User;

public interface UserService {
	
	/**
	 * User检索分页用，查询记录条数
	 * @return
	 */
	public int getUsersCount(String enterpriseName);
	
	/**
	 * User检索
	 * @return
	 */
	public List<User> getUsers(Map<String, Object> params);
	
	/**
	 * 追加User
	 * @param user
	 */
	public void insertUser(User user);
	
	/**
	 * 更新User
	 * @param user
	 */
	public void updateUser(User user);
	
	/**
	 * 通过id得到user
	 * @param id
	 * @return
	 */
	public User getUserById(int enterpriseId);
	
	/**
	 * 删除User
	 * @param user
	 */
	public void deleteUser(int enterpriseId);
	
	/**
	 * 验证userName是否重复
	 * (重复返回:false)
	 * flag: 1 追加时验证
	 * flag: 2 更新时验证
	 */
	public boolean checkUserName(User paramUser, int flag);
}
